﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Store Manager/SM_panel.master" AutoEventWireup="true" CodeFile="SM_POApproval.aspx.cs" Inherits="Store_Manager_SM_POApproval" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>

<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
    <style type="text/css">
        .style2
        {
            width: 100%;
        }
    </style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server" >

    <dx:ASPxGridView ID="ASPxGridView1" runat="server"
      DataSourceID="SqlDataSource1" KeyFieldName="Or_ID" 
        AutoGenerateColumns="False" ClientIDMode="AutoID" 
        CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
        Width="100%">
        <Columns>
           
            <dx:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="7">
            </dx:GridViewCommandColumn>
            <dx:GridViewDataTextColumn FieldName="Or_ID" VisibleIndex="0" Visible="False" >
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataDateColumn FieldName="Oder_Date" VisibleIndex="1">
            </dx:GridViewDataDateColumn>
            <dx:GridViewDataTextColumn FieldName="TotalProduct" VisibleIndex="2">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="Total" VisibleIndex="3">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataDateColumn FieldName="Book_GRNno" VisibleIndex="4">
            </dx:GridViewDataDateColumn>
            <dx:GridViewDataDateColumn FieldName="Date_Create" VisibleIndex="5">
            </dx:GridViewDataDateColumn>
            <dx:GridViewDataTextColumn FieldName="Sup_Name" VisibleIndex="6">
            </dx:GridViewDataTextColumn>
        </Columns>

        <Images SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css">
            <LoadingPanelOnStatusBar Url="~/App_Themes/BlackGlass/GridView/gvLoadingOnStatusBar.gif">
            </LoadingPanelOnStatusBar>
            <LoadingPanel Url="~/App_Themes/BlackGlass/GridView/Loading.gif">
            </LoadingPanel>
        </Images>

        <ImagesFilterControl>
            <LoadingPanel Url="~/App_Themes/BlackGlass/Editors/Loading.gif">
            </LoadingPanel>
        </ImagesFilterControl>

        <Styles CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" 
            CssPostfix="BlackGlass">
            <Header ImageSpacing="5px" SortingImageSpacing="5px">
            </Header>
        </Styles>

        <StylesEditors>
            <CalendarHeader Spacing="1px">
            </CalendarHeader>
            <ProgressBar Height="25px">
            </ProgressBar>
        </StylesEditors>

        <Templates>
            <DetailRow>
                <dx:ASPxGridView ID="ASPxGridView2" runat="server" KeyFieldName="Or_ID"  DataSourceID="SqlDataSource2" 
                OnBeforePerformDataSelect="detailGrid_DataSelect">
                <Columns>
            <dx:GridViewDataTextColumn FieldName="Or_ID" VisibleIndex="0">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataDateColumn FieldName="Pro_Name" VisibleIndex="1">
            </dx:GridViewDataDateColumn>
            <dx:GridViewDataTextColumn FieldName="Pur_Price" VisibleIndex="2">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataTextColumn FieldName="Description" VisibleIndex="3">
            </dx:GridViewDataTextColumn>
            <dx:GridViewDataDateColumn FieldName="Qty" VisibleIndex="4">
            </dx:GridViewDataDateColumn>
            
        </Columns>
                </dx:ASPxGridView>
            </DetailRow>
            </Templates>
        <SettingsDetail ShowDetailRow="True" />
    </dx:ASPxGridView>
      
    <table class="style2">
        <tr>
            <td>
                <dx:ASPxLabel ID="ASPxLabel2" runat="server" Visible="False">
                </dx:ASPxLabel>
            </td>
            <td>
                &nbsp;</td>
            <td>
                <asp:DropDownList ID="DropDownList1" runat="server">
                    <asp:ListItem>YES</asp:ListItem>
                    <asp:ListItem>NO</asp:ListItem>
                </asp:DropDownList>
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
            <td>
                <dx:ASPxButton ID="ASPxButton1" runat="server" ClientIDMode="AutoID" 
                    CssFilePath="~/App_Themes/BlackGlass/{0}/styles.css" CssPostfix="BlackGlass" 
                    onclick="ASPxButton1_Click" 
                    SpriteCssFilePath="~/App_Themes/BlackGlass/{0}/sprite.css" Text="Submit">
                </dx:ASPxButton>
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>

     <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
                
        
        
        SelectCommand="SELECT Or_ID, Pro_Name, Pur_Price, Description, Qty FROM Tbl_GRNrequest where Or_ID=@Or_ID">
         <SelectParameters>
            <asp:SessionParameter Name="Or_ID" SessionField="Or_ID" Type="String" />
         </SelectParameters>
               
            </asp:SqlDataSource>
      
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:BestlifeDBConnectionString %>" 
        
        SelectCommand="SELECT Tbl_GRN.Or_ID, Tbl_GRN.Oder_Date, Tbl_GRN.TotalProduct, Tbl_GRN.Total, Tbl_GRN.Book_GRNno, Tbl_GRN.Date_Create, Tbl_SupplierOrder.Sup_Name FROM Tbl_GRN INNER JOIN Tbl_SupplierOrder ON Tbl_GRN.Or_ID = Tbl_SupplierOrder.Or_ID">
    </asp:SqlDataSource>

     </asp:Content>

